---
layout: "default"
title: "reflect"
description: "Swift documentation for 'reflect': Produce a mirror for any value. If the value&#39;s type conforms to Reflectable,."
keywords: "reflect,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-reflect-t_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-reflect-t_-t">func reflect&lt;T&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-reflect-t_-t"><div class="p">
    <p>Produce a mirror for any value. If the value&#39;s type conforms to Reflectable,
invoke its getMirror() method; otherwise, fall back to an implementation
in the runtime that structurally reflects values of any type.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func reflect&lt;T&gt;(x: T) -&gt; MirrorType</code>
    
    
</div></div>
</div>
